/**
 * Copyright (c) 2019, ShangHai YTO Co., Ltd.
 * All right reserved.
 *
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF YTO
 * CO., LTD.  THE CONTENTS OF THIS FILE MAY NOT BE DISCLOSED
 * TO THIRD PARTIES, COPIED OR DUPLICATED IN ANY FORM, IN WHOLE OR IN PART,
 * WITHOUT THE PRIOR WRITTEN PERMISSION OF YTO
 * CO., LTD.
 */
package org.sc.xl.yuque;

import com.bumao.model.yuquesdk.domain.BookSerializer;
import com.bumao.model.yuquesdk.domain.DocSerializer;
import com.bumao.model.yuquesdk.domain.UserDetailSerializer;
import com.bumao.model.yuquesdk.exception.YuqueException;
import com.bumao.model.yuquesdk.service.YuqueClient;
import com.bumao.model.yuquesdk.vo.DocDetailVo;

import java.util.List;

/**
 * @description: TODO 请在此添加描述
 * @reason: TODO ADD REASON(可选)
 * @author FXL
 *
 * @date 2023/10/25 18:16 
 * @since JDK 1.8
 */
public class YuQueMain {


    public static void main(String[] args) throws YuqueException {
        YuqueClient client = new YuqueClient("gjWx2tt4okqB8H6rGLOd0Yv2m3lDtSVuMjDR76zn");
        UserDetailSerializer user2 = client.getCurrUserInfo();
        System.out.println(user2);
//        List<BookSerializer> groupbookSerializerList = client.listGroupReposById("hwuvpq","all",0);
//        groupbookSerializerList.forEach(e ->{
//            System.err.println(e);
//        });
//        System.out.println("------------------------------------------------------------");
//        List<DocSerializer> docSerializerList = client.listDocByNameSpace("20712555");
//        docSerializerList.forEach(e -> {
//            System.err.println(e);
//        });
//        System.out.println("------------------------------------------------------------");
//        DocDetailVo docDetailVo = client.getDocDetailBySlug("hwuvpq/pw0qyo","lxambghbhod4un5w");
//        System.out.println(docDetailVo.getData());//文章
//        System.out.println(docDetailVo.getAbilities());//Abilities
    }
}